package com.zretc.blog.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zretc.api.pojo.blogModule.dtos.BlogDto;
import com.zretc.api.pojo.blogModule.pojos.Blog;
import com.zretc.api.pojo.blogModule.pojos.BlogComment;
import com.zretc.common.entity.RespResult;
import org.springframework.stereotype.Component;
import org.springframework.web.multipart.MultipartFile;

@Component
public interface BlogService extends IService<Blog> {

     /**
      * 上传博文   新增或者更新
      * @param blogDto 博文传输对象
      * @return
      */
     RespResult submit(BlogDto blogDto);

     /**
      * 删除博文
      * @param blogDto 博文传输对象
      * @return
      */
     RespResult deleteBlog(BlogDto blogDto);

     /**
      * 根据channel查询博文
      * @param channel 频道名称
      * @return
      */
     RespResult getByChannel(String channel);

    RespResult getBlogDetails(BlogDto blogDto);

     RespResult createComment(BlogComment toComment, Long blogId, String commentContent);

    RespResult deleteComment(BlogComment blogComment);

    RespResult like(Long blogId);

    RespResult uploadImages(MultipartFile[] files);
}
